export const getServerTime=function (){  
    var xmlHttp = false;  
    try {  
        xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");  
    } catch (e) {  
        try {  
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");  
        } catch (e2) {  
            xmlHttp = false;  
        }  
    }  

    if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {  
        xmlHttp = new XMLHttpRequest();  
    }  

    xmlHttp.open("GET", window.location.href.toString(), false);  
    xmlHttp.setRequestHeader("If-None-Match", "bytes=-1");  
    xmlHttp.setRequestHeader("Cache-Control","no-cache");  
    xmlHttp.send(null); //发送get请求 

    return new Date(xmlHttp.getResponseHeader("Date"));//从响应头中获取当前网络时间  
    }
export const  checkAuditTime= function (begin,after){
    var nowDate=getServerTime();
    var beginDate=new Date(nowDate);
    var endDate=new Date(nowDate);
    beginDate.setHours(begin, 0, 0, 0);
    endDate.setHours(after, 0, 0, 0);
    if(nowDate.getTime()-beginDate.getTime()>=0 && nowDate.getTime() <= endDate.getTime()){
        return true;    
    }else{
        return false;
    }
}